package com.provider.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.provider.dao.TEpicDao;
import com.provider.entity.TEpic;
import com.provider.entity.TTask;
import com.provider.service.TEpicService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 项目EPIC任务(TEpic)表服务实现类
 *
 * @author makejava
 * @since 2024-04-28 12:57:01
 */
@Service("tEpicService")
@Transactional(rollbackFor = Exception.class)
public class TEpicServiceImpl extends ServiceImpl<TEpicDao, TEpic> implements TEpicService {

    @Override
    public List<TEpic> queryEpicBySystemId(String systemId) {
        LambdaQueryWrapper<TEpic> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(TEpic::getSystemId, systemId).eq(TEpic::getIsValid,"Y");
        return list(lambdaQueryWrapper);
    }

    @Override
    public List<TEpic> queryAllEpic() {
        LambdaQueryWrapper<TEpic> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.isNotNull(TEpic::getSystemId).eq(TEpic::getIsValid,"Y");
        return list(lambdaQueryWrapper);
    }
}

